package com.naiterui.ehp.bp.security.utils;

import cn.hutool.crypto.SecureUtil;

/**
 * 加密
 */
public class EncryptUtils {

  private final static byte[] KEY = "Passw0rd".getBytes();

  /**
   * 对称加密
   */
  public static String desEncrypt(String source) {
    return SecureUtil.des(KEY).encryptHex(source);
  }

  /**
   * 对称解密
   */
  public static String desDecrypt(String source) {
    return SecureUtil.des(KEY).decryptStr(source);
  }

}
